#include <iostream>
#include <string.h>
#include "ShareMemory.hpp"
#include "Fifo.hpp"

int main()
{
    shm.GetShm();
    shm.AttachShm();

    gpipe.OpenPipeForWrite();

    // IPC
    struct data *image = (struct data *)shm.GetAddr();
    //printf("client 虚拟地址：%p\n", );

    char ch = 'A';
    while(ch <= 'Z')
    {
        strcpy(image->status, "最新");
        strcpy(image->lasttime, GetCurrTime().c_str());
        strcpy(image->image, "xxxxxxxxxxxxxxxxxx");
        gpipe.Singal();
        ::sleep(3);
    }

    shm.DetachShm(); 

    return 0;
}